<?
include_once "accesscontrol.php";
include_once "../conn.php";

?>

<script src="prototype.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function findSub(){
new Ajax.Request('findstate.php', {
	method: 'get',
	parameters:{						 
						 id: $F('country')
						},
	onLoading: function() { $('sub').update('Loading...') },
	onSuccess: function(transport){
						 if(transport.responseText){
						 	$('sub').update(transport.responseText);
						}
					}
				});
}
//-->
</SCRIPT>

<?

$q1 = "select JS_number from job_employer_info where ename = \"$_SESSION[ename]\" ";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);

if($a1[0] < 1)
{
	echo "<script>top.location = 'pay1.php'</script>";
	//header("location:pay1.php");
	exit();
}

include_once "accesscontrol.php";

$category_list = job_categories("", "JobCategory", "");
$select_category = str_replace("<SELECT NAME=\"JobCategory\" >", "<select name=\"JobCategory\"><option value=\"\">All</option>", $category_list);

$career_level1 = career_level("", "");
$career_level = str_replace("<select name=\"careerlevel\">", "<select name=\"careerlevel\"><option value=\"\" selected>All</option>", $career_level1);

$tc = target_company("");
$target_company = str_replace("<select name=\"target_company\">", "<select name=\"target_company\"><option value=\"\">All</option>", $tc);

?>
<span class=HeaderClass>Employer Search</span><br><br><br><br>

<form action=Search2.php method=post>
<table align=center width=460 class=BlackText>
<tr>
	<td align=center colspan=2 class=HeaderClass>
	Search our database, using one or more of the following criterias:
	</td>
</tr>

<tr>
	<td align=left>Job category:</td>

	<td><?=$select_category?></td>
</tr>

<tr>
	<td align=left>Career level</td>
	<td><?=$career_level?></td>
</tr>

<tr>
	<td align=left>Target company</td>

	<td><?=$target_company?></td>
</tr>

<tr>
	<td align=left>City: </td>
  <td><input type=text name=city></td></td>
</tr>

<tr>
	<td align=left><b>State/Province: </b></td>
	<td>
		<div id="sub">
			<select name=state>
				<option value=" ">Select</option>
<?php
foreach ($state as $key => $value){
?>
		<option value="<?=$value?>"><?=$value?></option>
<?
}
?>	
			</select>
		</div></td>	
</tr>

<tr>
	<td align=left><b>Country: </b></td>
	<td><?=select_country($country, "country");?></td>	
</tr>

<tr>
	<td align=left>Sex:</td>
	<td>
		<select name=sex>
			<option value="">All</option>
			<option value="male">Male</option>
			<option value="female">Female</option>
		</select>
	</td>
</tr>

<tr>
	<td align=left>Availability employment:</td>
	<td>
	<select name=employment>
		<option value=" ">All</option>
		<option value="Immediately">Immediately</option>
		<option value="1 month to 3 months">1 month to 3 months</option>
		<option value="4 month to 7 months">4 month to 7 months</option>
		<option value="8 month to 1 year">8 month to 1 year</option>
		<option value="More than 1 year">More than 1 year</option>
	</select>
	</td>
</tr>

<tr> 
	<td  align=left>Salary required: </td>
	<td>
		<select name="income">
			  <option value="">All</option>
              <option value="Under 40,000">Under 40,000</option>
              <option value="40,000-60,000">40,000-60,000</option>
              <option value="60,000-80,000">60,000-80,000</option>
              <option value="80,000-100,000">80,000-100,000</option>
              <option value="100,000-150,000">100,000-150,000</option>
              <option value="150,000-200,000">150,000-200,000</option>
              <option value="200,000 &and over">200,000 &and over</option>
            </select>
	</td>
</tr>

<tr>
	<td align=left>Marital Status:</td>

	<td>
	<SELECT NAME="maritalstatus">
			  <option value="">All</option>
              <option value="Single">Single</option>
              <option value="Married">Married</option>
              <option value="Divorced">Divorced</option>
              <option value="Engaged">Engaged</option>
              <option value="Separated">Separated</option>
              <option value="Widowed">Widowed</option>
	</SELECT>
	</td>
</tr>



<tr>
	<td align=left>Age:</td>
	<td>
		<select name="age">
			<option value="0-99">All</option>
			<option value="0-20"><20</option>
			<option value="21-30">21-30</option>
			<option value="31-40">31-40</option>
			<option value="41-50">41-50</option>
			<option value="51-60">51-60</option>
			<option value="61-99">>60</option>
			
		</select>
	</td>
</tr>


<tr>
	<td align=left> Keyword: </td>
	<td> <input type=text name=kw style="width:177"></td>
</tr>

<tr>
	<td align=left>Search method: </td>
	<td>
	<input type=radio name=sm value=or checked>or
	&nbsp;&nbsp;&nbsp;&nbsp;
	<input type=radio name=sm value=and>and
	</td>
</tr>


<tr>
	<td align=center>
	<input type=submit name=submit value=Search>
	</td>

	<td align=center>
	<input type=reset name=reset value=Reset>
	</td>
</tr>


<tr><td colspan=2 class=TNA align=center> <br><br>*If you leave blank some fields, they will not take part in the search process.</td></tr>
</form>
</table>
</form>
<? include_once('../footer.php'); ?>